export function getUrlParam(url = '') {
    const obj = {}
    if (url.indexOf('?') == -1) {
        return obj
    }
    const firstFilter = url.split('?')
    if (firstFilter[firstFilter.length - 1].indexOf('&') == -1) {
        return splitAndBackObj(obj, firstFilter[firstFilter.length - 1])
    }
    const second = firstFilter[firstFilter.length - 1].split('&')
    second.forEach(v => {
        splitAndBackObj(obj, v)
    })
    return obj
}

function splitAndBackObj(obj, str) {
    const arr = str.split('=')
    obj[arr[0]] = arr[1]
}